package com.itheima.bos.base.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itheima.bos.base.dao.StandardRepository;
import com.itheima.bos.base.service.StandardService;
import com.itheima.bos.domain.Standard;
@Service
@Transactional
public class StandardServiceImpl implements StandardService {
     //注入DAO
	@Autowired
	private StandardRepository standardRepository;
    
	@Override
	public void save(Standard standard) {
		standardRepository.save(standard);
	}

	@Override
	public Page<Standard> findPageData(Pageable pageable) {
		return standardRepository.findAll(pageable);
		 
	}

	@Override
	public List<Standard> findAll() {
		
		return standardRepository.findAll();
	}

}
